import request from '@/utils/request'

export function getBranchApplyList(data) {
  return request({
    url: 'user/agent/apply/list',
    method: 'post',
    data
  })
}

export function verifyBranchApply(data) {
  const { id, agentMoney, status } = data
  return request({
    url: 'user/agent/apply/approve',
    method: 'post',
    params: { id, agentMoney, status }
  })
}

export function getUserAgentApply(id) {
  return request({
    url: 'user_agent_apply/get',
    method: 'post',
    params: { id }
  })
}

export function addUserAgentApply(data) {
  return request({
    url: 'user_agent_apply/add',
    method: 'post',
    data
  })
}

export function editUserAgentApply(data) {
  return request({
    url: 'user_agent_apply/edit',
    method: 'post',
    data
  })
}

export function editUserAgentApplyStatus(id, status) {
  return request({
    url: 'user_agent_apply/edit_status',
    method: 'post',
    params: { id, status }
  })
}
